stage.set_background_color("lightblue")
# sprite = codesters.Rectangle(x, y, width, height, "color")
sprite = codesters.Rectangle(0, 0, 700, 100, "gold")
sprite.turn_left(45)
# sprite = codesters.Rectangle(x, y, width, height, "color")
sprite = codesters.Rectangle(0, 0, 700, 100, "gold")
sprite.turn_right(45)
sprite = codesters.Sprite("earth")
people_sprites = ['person1', 'person2', 'person3', 'person4', 'person5', 'person6',
'person7', 'person8','person9', 'person10', 'person11', 'person12']
rotate = 90
for value in people_sprites:
# add code here
sprite = codesters.Sprite("codester")
t = codesters.Teacher()
try:
tval1 = stage.get_wait_time()
except:
tval1 = "DNE"
try:
params = t.find_function('wait')
tval2 = t.get_indent_at_line(params[0][0])
except:
tval2 = "DNE"
try:
sprites = t.get_parameters_for_function('Sprite')
tval3 = sprites[1][0]
except:
tval3 = "DNE"
try:
indents = t.find_function('Sprite')
tval4 = t.get_indent_at_line(indents[1][0])
except:
tval4 = "DNE"
t1 = TestObjective()
t1.add_success(tval1 == .2, "Great Job!")
t1.add_failure(tval1 == 0, "Did you drag in a wait tool from the toolkit?")
t1.add_failure(tval1 == "DNE", "You did something else.")
t1.add_failure(tval1 != .2 and tval1 != "DNE" and tval1 != 0 and tval1 > .5, "That's too long to wait - did you change the number to 0.5?")
t1.add_creative(tval1 != .2 and tval1 != "DNE" and tval1 != 0 and tval1 <= .5, "That's a short wait!")
t2 = TestObjective()
t2.add_success(tval2 == 4, "Great job!")
t2.add_failure(tval2 == 0, "Did you indent the wait command under the for loop?")
t2.add_failure(tval2 > 4 and tval2 != "DNE", "You indented wait too far.")
t2.add_failure(tval2 == "DNE", "Did you add a wait command?")
t3 = TestObjective()
t3.add_success(tval3 == 'value', "Great job!")
t3.add_failure(tval3 == '"codester"', "Did you change the image label from 'codester' to value?")
t3.add_failure(tval3 == "DNE", "Did you delete the sprite command inside the loop?")
t4 = TestObjective()
t4.add_success(tval4 == 4, "Great job!")
t4.add_failure(tval4 == 0, "Did you indent the sprite command under the for loop?")
t4.add_failure(tval4 > 4 and tval2 != "DNE", "You indented the sprite command too far!")
t4.add_failure(tval4 == "DNE", "Did you delete the sprite command inside the loop?")
tester = TestManager()
tester.add_test_list([t1, t2, t3,t4])
tester.run_tests()
tester.display_first_feedback()